package com.apartment.common.exception;

import com.apartment.common.result.ResultCodeEnum;
import lombok.Data;

@Data
public class ApartmentException extends RuntimeException{
    private Integer code;
    public ApartmentException(Integer code,String massage){
        super(massage);
        this.code = code;
    }
    public ApartmentException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
